package com.ge.util;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class IndexMap implements Map {

	private Map mapData = new HashMap();
	
	public void clear() {
		
	}

	public boolean containsKey(Object key) {
		return false;
	}

	public boolean containsValue(Object value) {
		return false;
	}

	public Set entrySet() {
		return null;
	}

	public synchronized Object get(Object key) {
		String strKey = null;
		if (key instanceof String) {
			strKey = (String)key;
		} else {
			strKey = key.toString();
		}
		
		if (strKey.length() == 0) {
			return null;
		}
		
		char chIndex = strKey.charAt(0);
		Map mapItemData = (Map)mapData.get(Character.valueOf(chIndex));
		if (mapItemData == null) {
			return null;
		}
		
		return mapItemData.get(key);
	}

	public boolean isEmpty() {
		return false;
	}

	public Set keySet() {
		return null;
	}

	public synchronized Object put(Object arg0, Object arg1) {
		String strKey = null;
		if (arg0 instanceof String) {
			strKey = (String)arg0;
		} else {
			strKey = arg0.toString();
		}
		
		if (strKey.length() == 0) {
			return null;
		}
		
		char chIndex = strKey.charAt(0);
		Map mapItemData = (Map)mapData.get(Character.valueOf(chIndex));
		if (mapItemData == null) {
			mapItemData = new HashMap();
			mapData.put(Character.valueOf(chIndex), mapItemData);
		}
		
		mapItemData.put(arg0, arg1);
		
		return arg1;
	}

	public void putAll(Map arg0) {
		
	}

	public Object remove(Object key) {
		return null;
	}

	public int size() {
		return 0;
	}

	public Collection values() {
		return null;
	}

}
